Integrand size = 17, antiderivative size = 248 \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {x^3}{6}+\frac {b^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {\sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}-\frac {b^2 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{5/2}}-\frac {b \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3549, 3545, 3543, 3529, 3433, 3432, 3528} \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=-\frac {\sqrt {\pi } \sin \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}+\frac {\sqrt {\pi } b^2 \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } b^2 \sin \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {b \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {x^3}{6} \]
[In]
[Out]
Rule 3432
Rule 3433
Rule 3528
Rule 3529
Rule 3543
Rule 3545
Rule 3549
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {x^2}{2}+\frac {1}{2} x^2 \cos \left (2 a+2 b x+2 c x^2\right )\right ) \, dx \\ & = \frac {x^3}{6}+\frac {1}{2} \int x^2 \cos \left (2 a+2 b x+2 c x^2\right ) \, dx \\ & = \frac {x^3}{6}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}-\frac {\int \sin \left (2 a+2 b x+2 c x^2\right ) \, dx}{8 c}-\frac {b \int x \cos \left (2 a+2 b x+2 c x^2\right ) \, dx}{4 c} \\ & = \frac {x^3}{6}-\frac {b \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {b^2 \int \cos \left (2 a+2 b x+2 c x^2\right ) \, dx}{8 c^2}-\frac {\cos \left (2 a-\frac {b^2}{2 c}\right ) \int \sin \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c}-\frac {\sin \left (2 a-\frac {b^2}{2 c}\right ) \int \cos \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c} \\ & = \frac {x^3}{6}-\frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {\sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}-\frac {b \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c}+\frac {\left (b^2 \cos \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \cos \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c^2}-\frac {\left (b^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right ) \int \sin \left (\frac {(2 b+4 c x)^2}{8 c}\right ) \, dx}{8 c^2} \\ & = \frac {x^3}{6}+\frac {b^2 \sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{5/2}}-\frac {\sqrt {\pi } \cos \left (2 a-\frac {b^2}{2 c}\right ) \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right )}{16 c^{3/2}}-\frac {\sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{3/2}}-\frac {b^2 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \sin \left (2 a-\frac {b^2}{2 c}\right )}{16 c^{5/2}}-\frac {b \sin \left (2 a+2 b x+2 c x^2\right )}{16 c^2}+\frac {x \sin \left (2 a+2 b x+2 c x^2\right )}{8 c} \\ \end{align*}
Time = 0.45 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.69 \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {-3 \sqrt {\pi } \operatorname {FresnelS}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \left (c \cos \left (2 a-\frac {b^2}{2 c}\right )+b^2 \sin \left (2 a-\frac {b^2}{2 c}\right )\right )+3 \sqrt {\pi } \operatorname {FresnelC}\left (\frac {b+2 c x}{\sqrt {c} \sqrt {\pi }}\right ) \left (b^2 \cos \left (2 a-\frac {b^2}{2 c}\right )-c \sin \left (2 a-\frac {b^2}{2 c}\right )\right )+\sqrt {c} \left (8 c^2 x^3-3 (b-2 c x) \sin (2 (a+x (b+c x)))\right )}{48 c^{5/2}} \]
[In]
[Out]
Time = 0.68 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.77
method | result | size |
default | \(\frac {x^{3}}{6}+\frac {x \sin \left (2 c \,x^{2}+2 b x +2 a \right )}{8 c}-\frac {b \left (\frac {\sin \left (2 c \,x^{2}+2 b x +2 a \right )}{4 c}-\frac {b \sqrt {\pi }\, \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )+\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{4 c^{\frac {3}{2}}}\right )}{4 c}-\frac {\sqrt {\pi }\, \left (\cos \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {S}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )-\sin \left (\frac {-4 a c +b^{2}}{2 c}\right ) \operatorname {C}\left (\frac {2 c x +b}{\sqrt {c}\, \sqrt {\pi }}\right )\right )}{16 c^{\frac {3}{2}}}\) | \(191\) |
risch | \(\frac {x^{3}}{6}+\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}} \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right )}{64 c^{2} \sqrt {i c}}-\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {i \left (4 a c -b^{2}\right )}{2 c}} \sqrt {2}\, \operatorname {erf}\left (\sqrt {2}\, \sqrt {i c}\, x +\frac {i b \sqrt {2}}{2 \sqrt {i c}}\right )}{64 c \sqrt {i c}}-\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}} \operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right )}{32 c^{2} \sqrt {-2 i c}}-\frac {i \sqrt {\pi }\, {\mathrm e}^{\frac {i \left (4 a c -b^{2}\right )}{2 c}} \operatorname {erf}\left (-\sqrt {-2 i c}\, x +\frac {i b}{\sqrt {-2 i c}}\right )}{32 c \sqrt {-2 i c}}+2 i \left (-\frac {i x}{16 c}+\frac {i b}{32 c^{2}}\right ) \sin \left (2 c \,x^{2}+2 b x +2 a \right )\) | \(272\) |
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.72 \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {8 \, c^{3} x^{3} + 6 \, {\left (2 \, c^{2} x - b c\right )} \cos \left (c x^{2} + b x + a\right ) \sin \left (c x^{2} + b x + a\right ) + 3 \, {\left (\pi b^{2} \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) - \pi c \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \sqrt {\frac {c}{\pi }} \operatorname {C}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right ) - 3 \, {\left (\pi b^{2} \sin \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right ) + \pi c \cos \left (-\frac {b^{2} - 4 \, a c}{2 \, c}\right )\right )} \sqrt {\frac {c}{\pi }} \operatorname {S}\left (\frac {{\left (2 \, c x + b\right )} \sqrt {\frac {c}{\pi }}}{c}\right )}{48 \, c^{3}} \]
[In]
[Out]
\[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\int x^{2} \cos ^{2}{\left (a + b x + c x^{2} \right )}\, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.06 (sec) , antiderivative size = 1617, normalized size of antiderivative = 6.52 \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\text {Too large to display} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.46 (sec) , antiderivative size = 214, normalized size of antiderivative = 0.86 \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\frac {1}{6} \, x^{3} - \frac {{\left (c {\left (2 i \, x + \frac {i \, b}{c}\right )} - 2 i \, b\right )} e^{\left (2 i \, c x^{2} + 2 i \, b x + 2 i \, a\right )} - \frac {i \, \sqrt {\pi } {\left (b^{2} + i \, c\right )} \operatorname {erf}\left (-\frac {1}{2} i \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {i \, b^{2} - 4 i \, a c}{2 \, c}\right )}}{\sqrt {c} {\left (\frac {i \, c}{{\left | c \right |}} + 1\right )}}}{32 \, c^{2}} - \frac {{\left (c {\left (-2 i \, x - \frac {i \, b}{c}\right )} + 2 i \, b\right )} e^{\left (-2 i \, c x^{2} - 2 i \, b x - 2 i \, a\right )} + \frac {i \, \sqrt {\pi } {\left (b^{2} - i \, c\right )} \operatorname {erf}\left (\frac {1}{2} i \, \sqrt {c} {\left (2 \, x + \frac {b}{c}\right )} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}\right ) e^{\left (-\frac {-i \, b^{2} + 4 i \, a c}{2 \, c}\right )}}{\sqrt {c} {\left (-\frac {i \, c}{{\left | c \right |}} + 1\right )}}}{32 \, c^{2}} \]
[In]
[Out]
Timed out. \[ \int x^2 \cos ^2\left (a+b x+c x^2\right ) \, dx=\int x^2\,{\cos \left (c\,x^2+b\,x+a\right )}^2 \,d x \]
[In]
[Out]